<!DOCTYPE html>
<meta charset="UTF-8">
<style>
.parent {
  -webkit-mask-box-image-outset: 30px;
}
.target {
  width: 100px;
  height: 100px;
  background-color: black;
  display: inline-block;
  border: 25px;
  margin-right: 50px;
  -webkit-mask-box-image-slice: 30%;
  -webkit-mask-box-image-source: linear-gradient(45deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 1));
  -webkit-mask-box-image-outset: 10px;
}
.expected {
  background-color: green;
}
</style>
<body>
<script src="resources/interpolation-test.js"></script>
<script>
assertInterpolation({
  property: '-webkit-mask-box-image-outset',
  from: neutralKeyframe,
  to: '20px',
}, [
  {at: -0.3, is: '7px'},
  {at: 0, is: '10px'},
  {at: 0.4, is: '14px'},
  {at: 0.6, is: '16px'},
  {at: 1, is: '20px'},
  {at: 1.5, is: '25px'},
]);

assertInterpolation({
  property: '-webkit-mask-box-image-outset',
  from: 'initial',
  to: '20',
}, [
  {at: -0.3, is: '0'},
  {at: 0, is: '0'},
  {at: 0.4, is: '8'},
  {at: 0.6, is: '12'},
  {at: 1, is: '20'},
  {at: 1.5, is: '30'},
]);

assertInterpolation({
  property: '-webkit-mask-box-image-outset',
  from: 'inherit',
  to: '20px',
}, [
  {at: -0.3, is: '33px'},
  {at: 0, is: '30px'},
  {at: 0.4, is: '26px'},
  {at: 0.6, is: '24px'},
  {at: 1, is: '20px'},
  {at: 1.5, is: '15px'},
]);

assertInterpolation({
  property: '-webkit-mask-box-image-outset',
  from: 'unset',
  to: '20',
}, [
  {at: -0.3, is: '0'},
  {at: 0, is: '0'},
  {at: 0.4, is: '8'},
  {at: 0.6, is: '12'},
  {at: 1, is: '20'},
  {at: 1.5, is: '30'},
]);

assertInterpolation({
  property: '-webkit-mask-box-image-outset',
  from: '0px',
  to: '50px',
}, [
  {at: -0.3, is: '0px'}, // CSS -webkit-mask-box-image-outset can't be negative.
  {at: 0, is: '0px'},
  {at: 0.4, is: '20px'},
  {at: 0.6, is: '30px'},
  {at: 1, is: '50px'},
  {at: 1.5, is: '75px'}
]);
assertInterpolation({
  property: '-webkit-mask-box-image-outset',
  from: '0',
  to: '50',
}, [
  {at: -0.3, is: '0'}, // CSS -webkit-mask-box-image-outset can't be negative.
  {at: 0, is: '0'},
  {at: 0.4, is: '20'},
  {at: 0.6, is: '30'},
  {at: 1, is: '50'},
  {at: 1.5, is: '75'}
]);
</script>
</body>
